package com.woniuxy.controller;

import com.woniuxy.entity.Category;
import com.woniuxy.entity.ResponseEntity;
import com.woniuxy.service.CategoryService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @ClassName CategoryController
 * @Description TODO
 * @Author 冯浩波
 * @Date 2022/3/15 19:30
 */
@RestController
@RequestMapping("/category/")
public class CategoryController {
    @Autowired(required = false)
    CategoryService categoryService;

    @ApiOperation(value = "查找类型")
    @RequestMapping("/findCategory/")
    public ResponseEntity findCategory(@RequestBody Category category){
        return categoryService.findCategory(category);
    }
}